<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script type="module">
      import QRCode from "https://esm.sh/qrcode@1.5.3";

      // 生成 Data URL
      const url = await QRCode.toDataURL("Hello ESM!");
      const img = document.createElement("img");
      img.src = url;
      document.body.appendChild(img);
    </script>
  </body>
</html>
